﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<GabageFactory.Models.stack_settle_offset>" %>
<%@ Import Namespace="System.Collections.Generic" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	沉降及位移观测（每月）
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <div id="dolphincontainer">
	    <div id="dolphinnav">
	        <ul class="top_tab">
                <li><a href="/Record/StackWater/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"] %>&factoryId=<%=ViewData["factoryId"] %>"><span>水位及水质</span></a></li>
                <li><a href="/Record/BackWater/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"] %>&factoryId=<%=ViewData["factoryId"] %>"><span>进浆及回水</span></a></li>
                <li><a href="javascript:return(false);" class="current"><span>沉降及位移</span></a></li>
                <li><a href="/Record/Ardealite/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"] %>&factoryId=<%=ViewData["factoryId"] %>"><span>磷石膏堆积坝</span></a></li>
                <li><a href="/Record/Ditch/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"]%>&factoryId=<%=ViewData["factoryId"] %>"><span>截洪沟</span></a></li>
                <li><a href="/Record/PiezometerWell/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"]%>&factoryId=<%=ViewData["factoryId"] %>"><span>浸润线观测</span></a></li>
                <li><a href="/Record/PiezometerBase/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"]%>&factoryId=<%=ViewData["factoryId"] %>"><span>渗压观测</span></a></li>
                <li><a href="/Record/Drain/<%=ViewData["id"] %>?date=<%=(DateTime)ViewData["originalDate"]%>&factoryId=<%=ViewData["factoryId"] %>"><span>导渗系统</span></a></li>
	        </ul>
	    </div>
	</div>

    <%
           bool result = (bool)ViewData["success"];
           if(result){ 
        %>
           <div class="tips_area">沉降及位移更新成功</div>
        <%
        }
        %>

    <% using (Html.BeginForm())
    {%>
        <%= Html.ValidationSummary(true) %>
        <%= Html.HiddenFor(model => model.stack_id) %>
        <%= Html.Hidden("factoryId", ViewData["factoryId"]) %>
        <%= Html.Hidden("date", (DateTime)ViewData["originalDate"])%>
      


    <table cellpadding="4" cellspacing="0" class="com_from_table" style="width:756px;">
        <tr>
            <th colspan="2">沉降及位移（每月 - <%= Model.date.Year%>年<%=Model.date.Month%>月）</th>
        </tr>

        <tr>
            <td class="lab" style="width:164px;">测量人员：</td>
            <td>
                <%= Html.DropDownList("tester_id", ViewData["users"] as List<SelectListItem>, "请选择", new { style = "width:150px" })%>
                <%= Html.ValidationMessageFor(model => model.tester_id)%>
            </td>
        </tr>
    </table>

    <fieldset class="tf_style">
        <legend>高程：</legend>

        <table cellpadding="4" cellspacing="0" class="com_from_table">
            <tr>
                <td class="lab" style="width:150px;">初期坝坝顶高程：</td>
                <td>
                    <%= Html.TextBoxFor(model => model.dike_init_top_El, new { style = "width:50px" })%> m
                    <%= Html.ValidationMessageFor(model => model.dike_init_top_El)%>
                </td>
            </tr>
            
            <%
                stack_settle_offset_pool_info[] offsetPoolInfos = (stack_settle_offset_pool_info[])ViewData["offsetPoolInfos"];
                for (int i = 0; i < offsetPoolInfos.Length; i++)
                {
            %>
            <tr>
                <td class="lab">调节水池<%=(i+1) %>#挡水坝高程：</td>
                <td>
                    <%= Html.TextBox("ditch_El" + (i + 1), offsetPoolInfos[i].ditch_El, new { style = "width:50px" })%> m
                    <%= Html.ValidationMessage("ditch_El" + (i + 1))%>
                </td>
            </tr>
            <%
                } 
            %>

            <tr>
                <td class="lab">库尾坝坝顶高程：</td>
                <td>
                    <%= Html.TextBoxFor(model => model.tailing_dike_top_El, new { style = "width:50px" })%> m
                    <%= Html.ValidationMessageFor(model => model.tailing_dike_top_El)%>
                </td>
            </tr>
        </table>
    </fieldset>
    

    <fieldset class="tf_style">
        <p>
            <span style="display:inline-block;width:180px">坝体有无异常变形：</span>
            <span><input type="radio" name="is_shape_changed" value="1" <%if (Model.is_shape_changed == 1){ %> checked="checked"<%} %> onclick='switchComment("is_shape_changed", "shape_change_desc");' />有</span>
            <span><input type="radio" name="is_shape_changed" value="0" <%if (Model.is_shape_changed != 1){ %> checked="checked"<%} %> onclick='switchComment("is_shape_changed", "shape_change_desc");' />无</span>
        </p>
        <%= Html.TextAreaFor(model => model.shape_change_desc, new { cols="80",rows="5"})%>
        <%= Html.ValidationMessageFor(model => model.shape_change_desc)%>
        <p></p>
        <p>
            <span style="display:inline-block;width:180px">挡水坝下游有无渗流迹象：</span>
            <span><input type="radio" name="is_ditch_leaked" value="1" <%if (Model.is_ditch_leaked == 1){ %> checked="checked"<%} %> onclick='switchComment("is_ditch_leaked", "ditch_leaked_desc");'/>有</span>
            <span><input type="radio" name="is_ditch_leaked" value="0" <%if (Model.is_ditch_leaked != 1){ %> checked="checked"<%} %> onclick='switchComment("is_ditch_leaked", "ditch_leaked_desc");' />无</span>
        </p>
        <%= Html.TextAreaFor(model => model.ditch_leaked_desc, new { cols="80",rows="5"})%>
        <%= Html.ValidationMessageFor(model => model.ditch_leaked_desc)%>
    </fieldset>


    <fieldset class="tf_style">
        <legend>当月情况补充：</legend>
        <%= Html.TextAreaFor(model => model.description, new { cols="80",rows="5"})%>
        <%= Html.ValidationMessageFor(model => model.description)%>
    </fieldset>


    <div class="submit_btn_area" style="margin-left:172px;">
        <%=Html.Hidden("poolNum", offsetPoolInfos.Length)%>
        <input type="submit" value="提 交" />
    </div>

    <% } %>
    <script type="text/javascript">
        function switchComment(optionName, commentId) {
            var value = $("input[name=" + optionName + "]:checked").val();
            if (value == "0") {
                $("#" + commentId).css("display", "none");
            }
            else {
                $("#" + commentId).css("display", "");
            }
        }

        switchComment("is_shape_changed", "shape_change_desc");
        switchComment("is_ditch_leaked", "ditch_leaked_desc");
    </script>    
</asp:Content>
